from django.contrib import admin
from django.urls import path,re_path
from django.views.static import serve
# from myapp.views import MyView
from myapp.md_user import Register,MyCode,Login,weibo_back,ding_back,UploadFile,QiNiu,UpdateUser,UpdatePassword,Show,Userser
from myapp.md_goods import AddGoods,CategoryInfo
urlpatterns = [
    #定义超链接路由
    re_path('^static/upload/(?P<path>.*)$',serve,{'document_root':'/static/upload/'}),
    # path('',MyView.as_view()),
    path('register/',Register.as_view()),
    path('code/',MyCode.as_view()),
    path('login/',Login.as_view()),
    path('md_admin/weibo/',weibo_back),
    path('dingding_back/',ding_back),
    path('uploadfile/',UploadFile.as_view()),
    path('uptoken/',QiNiu.as_view()),
    path('updateuser/',UpdateUser.as_view()),
    path('updatepassword/', UpdatePassword.as_view()),
    path('show/', Show.as_view()),
    path('addgoods/',AddGoods.as_view()),
    path('categoryinfo/',CategoryInfo.as_view()),
    path('userser/',Userser.as_view())
]